/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.excesys.exsecs.om.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.excesys.exsecs.om.dto.ExceptionDto;
import com.excesys.exsecs.om.dto.WarrantyMethodDto;
import com.excesys.exsecs.om.entity.OmInspectionResult;
import com.excesys.exsecs.om.vo.ResutlVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 巡检区域分类表
 *
 * @author
 * @date 2023-05-19
 */
@Mapper
public interface OmInspectionResultMapper extends BaseMapper<OmInspectionResult> {

	OmInspectionResult getList(@Param("inspectionSheetId") String inspectionSheetId,
			@Param("pointCode") String pointCode,
			@Param("inspectionAreaClassification") String inspectionAreaClassification);

	List<OmInspectionResult> getLists(@Param("inspectionSheetId") String inspectionSheetId,
			@Param("pointCode") String pointCode,
			@Param("inspectionAreaClassification") String inspectionAreaClassification);

	OmInspectionResult getResult(@Param("inspectionSheetId") String inspectionSheetId,
			@Param("pointCode") String pointCode,
			@Param("inspectionAreaClassification") String inspectionAreaClassification);

	List<OmInspectionResult> getInpsectionStatus();

	List<OmInspectionResult> getNormalStatus();

	List<OmInspectionResult> getResultList(@Param("id") String id, @Param("code") String code);

	List<WarrantyMethodDto> getInpsectionYearList();

	List<WarrantyMethodDto> getInpsectionNormalYearList();

	OmInspectionResult getOmInspectionResultList(@Param("pointCode") String pointCode,
			@Param("inspectionSheetId") String inspectionSheetId);

	OmInspectionResult getFlag(@Param("pointCode") String pointCode,
			@Param("inspectionSheetId") String inspectionSheetId);

	List<WarrantyMethodDto> getMonthExceptionList();

	List<WarrantyMethodDto> getMonthNormalList();

	List<WarrantyMethodDto> getExceptionByToday();

	List<WarrantyMethodDto> getNormalByToday();

	List<WarrantyMethodDto> getTheWeekExceptionList();

	List<WarrantyMethodDto> getTheWeekNormalList();

	void updateResult(@Param("inspectionSheetId") String inspectionSheetId, @Param("pointCode") String pointCode,
			@Param("nfcTime") String nfcTime);

	List<OmInspectionResult> getNormalResultNum(@Param("query") Map map, @Param("id") String id);

	List<OmInspectionResult> getNormalResultNumByTime(@Param("startTime") String startTime,
			@Param("endTime") String endTime, @Param("id") String id);

	List<OmInspectionResult> getAnomaliesResultNum(@Param("query") Map map, @Param("id") String id);

	List<OmInspectionResult> getAnomaliesResultNumByTime(@Param("startTime") String startTime,
			@Param("endTime") String endTime, @Param("id") String id);

	IPage<ExceptionDto> getResultLists(Page page, @Param("query") ResutlVo resultDto);

}
